<?php
namespace app\index\controller;
use think\Controller;
use think\Session;
use think\Db;

//公共控制器
class Common extends Controller
{

	public function __construct()
    {
        parent::__construct();
        $session = session('username');
		if (empty($session)) 
		{
			return $this->redirect('login/login');
			// echo "<script> alert('请登录');location.href='index/login/login.html';</script>";
		}
	}
}